package com.manage.controller;

import com.clms.common.R;
import com.manage.pojo.entity.TbIntegrationHistory;
import com.manage.pojo.entity.TbMemberLevel;
import com.manage.pojo.vo.IntegralVo;
import com.manage.pojo.vo.VipLevelVo;
import com.manage.service.IntegralService;
import com.manage.service.VipLevelService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @program: clms-third
 * @description: 积分控制层
 * @author: 林子洁
 * @create: 2021-07-23 14:42
 **/
@RestController
@RequestMapping("/manage/integral")
public class IntegralController {
    @Resource
    private IntegralService integral;

    @PostMapping("/initIntegral/{currentPage}/{pageSize}")
    public R initIntegral(@PathVariable("currentPage") Integer currentPage,
                          @PathVariable("pageSize") Integer pageSize,
                          @RequestBody IntegralVo integralVo) {
        return integral.initIntegral(currentPage, pageSize, integralVo);
    }

    @DeleteMapping("/deleteIntegral/{id}")
    public R deleteIntegral(@PathVariable("id") Integer id) {
        return integral.deleteIntegral(id);
    }

}
